<template>
  <div class="wrapper">
    <scroller class="main-list">
      <div class="list" v-for="(item ,index) in recommendList ">
        <image class="image" resize="cover" :src="item.recommendPagePic2"></image>
        <text class="title">{{item.title}}</text>
        <text class="subTitle">{{item.subTitle}}</text>
      </div>
    </scroller>
  </div>
</template>

<script>
  import {GETRECOMENDLIST} from '@/const/shareUri'
  const stream = weex.requireModule('stream');
  export default {
    name: "zetianshuo",
    data() {
      return {
        recommendList: [],
      }
    },
    created() {
      //this.initData();
      this.initdata2();
    },
    methods: {
      initData() {
        this.$ajax.get('https://suggest.taobao.com/sug?', {
          code: 'utf-8',
          q: '手机',
          callback: 'cb'
        }, res => {
          console.log(res.result);
        });
      },
      initdata2() {
        this.$ajax.get(GETRECOMENDLIST, {}, res => {
          console.log(res.data);
          this.recommendList = res.data;
        });
      },
    }
  }
</script>

<style scoped>
  .main-list {
    position: fixed;
    top: 0px;
    bottom: 90px;
    left: 0;
    right: 0;
    /*margin-top: 167px;*/
    /*margin-bottom: 90px;*/
  }

  .list {
    padding: 28px;
    border-bottom-color: #d5d4d4;
    border-bottom-style: solid;
    border-bottom-width:1px;
  }
  .main-list .list:last-child{
    border:none;
  }

  .image {
    width: 694px;
    height: 392px;
    border-radius: 10px;
  }
  .title{
    font-size: 30px;
    margin-top: 26px;
    margin-bottom: 10px;
    color: #323232;
    font-weight: 500;
  }
  .subTitle{
    font-size:25px;
    color:#454545;
  }

</style>